/*
Project: Picture Download Toolbar
Author: Lasantha Bandara
Index No: 070045e
Dipartment: Computer Science and Engineering, University of Moratuwa

File Name: view.js
Purpose: just a test page. not completed. please ignore for the moment.
*/
var imgValue;
var part1=new Array();
var list=new Array();
var show=true;

chrome.extension.onRequest.addListener(
  function(request, sender, sendResponse) {
  	imgValue=request.picNo;	
	var imgno=parseInt(imgValue)-1;
	var x=document.getElementById("tDataImage"+imgno).firstChild.innerHTML;
	part1=x.split("M:");
	list=part1[1].split('"');
	
	if(show){
	window.open(list[0],"_parent","");
	}
	show=false;
	}
	
  );


